/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.paroquiadegloria.ejc.dao;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;

/**
 *
 * @author Jadum
 */
public class ConfigProperties {
    private ResourceBundle bundle;
    private Enumeration<String> keys;
    private Map<String, String> mapProperties;
    
    public ConfigProperties(String propertieFile){
        bundle = ResourceBundle.getBundle(propertieFile);
        keys = bundle.getKeys();
        mapProperties = new HashMap<String, String>();
    }
    
    private void loadMapProperties(){
        while(keys.hasMoreElements()){
            String key = keys.nextElement();
            mapProperties.put(key, bundle.getString(key));
        }
    }
    
    public String getValue(String key){
        return bundle.getString(key);
    }

    public Map<String, String> getMapProperties() {
        return mapProperties;
    }
    
}
